﻿@model List<DauGiaApp.Models.SanPham>
<link href="../../Content/managestyle.css" rel="stylesheet" type="text/css" />
<link href="../../Content/QuanLyComment.css" rel="stylesheet" type="text/css" />
@{
    ViewBag.Title = "CommentManage";
    Layout = "~/Views/Manager/_LayoutManager.cshtml";
}
<div id ="dssanpham">
    @for (int i = 0; i < Model.Count; i++)
    {
        <div class="item_sanpham">
            <a class=".tensanpham" href="../SanPham/ChiTiet?id=@Model[i].MaSanPham">@Model[i].TenSanPham</a>
            <div class="ds_comment">
                @{                
                               List<DauGiaApp.Models.Comment> dscomment = Model[i].LayDanhSachComment();
                }

                @for (int j = 0; j < dscomment.Count; j++)
                {
                     <div class="sp_item_comment">
                        <div class="title">
                            <span class="title_sp_item_comment"><a href="" >@dscomment[j].TaiKhoan.TenTaiKhoan</a></span>
                            <span class="delete">@dscomment[j].MaComment.ToString()<a href = "DeleteComment?id=@dscomment[j].MaComment"><img alt ="" src="../../Content/images/delete.png"/></a></span>
                        </div>                        
                        <p class="content_sp_item_comment">@dscomment[j].NoiDungComment</p>
                    </div>
                }
            </div>
        </div> 
    }
</div>
